fix: add error handling for launchUrl in About Us feedback link#3375
Closed
prajakta128 wants to merge 4 commits into
Closed
fix: add error handling for launchUrl in About Us feedback link#3375prajakta128 wants to merge 4 commits into
prajakta128 wants to merge 4 commits into
Conversation
UsbSerial.usbEventStream?.listen() and Connectivity() .onConnectivityChanged.listen() were called without storing the returned StreamSubscription objects, so they could never be cancelled. This causes a memory leak on every hot-restart or re-initialization as subscriptions accumulate. Fix: store both subscriptions in _usbSubscription and _connectivitySubscription fields, and cancel them in dispose().
The latest Visual Studio removed support for experimental C++ features (/await compiler option, <experimental/coroutine>), causing the Windows Flutter build to fail with error STL1011. Adding _SILENCE_EXPERIMENTAL_COROUTINE_DEPRECATION_WARNINGS to the existing add_definitions call suppresses the error so Windows builds work again while a permanent upstream fix is awaited in the permission_handler_windows plugin. Fixes fossasia#3246
The feedback link in about_us_screen.dart called launchUrl() with no canLaunchUrl check or try/catch block. If the URL fails to launch, this throws an unhandled exception and crashes the app. Added canLaunchUrl check consistent with how other links in the same file are already handled. Fixes #XXXX
Contributor
There was a problem hiding this comment.
Sorry @prajakta128, you have reached your weekly rate limit of 500000 diff characters.
Please try again later or upgrade to continue using Sourcery
Contributor
Build StatusBuild successful. APKs to test: https://github.com/fossasia/pslab-app/actions/runs/28354945593/artifacts/7945123360. Screenshots |
rahul31124
suggested changes
Jun 29, 2026
rahul31124
left a comment
Member
There was a problem hiding this comment.
Hi @prajakta128, could you please remove the following files?
lib/providers/board_state_provider.dartwindows/CMakeLists.txt
Contributor
Author
|
Closing this PR — it accidentally included files from already-merged PRs (lib/providers/board_state_provider.dart and windows/CMakeLists.txt) due to branching on top of earlier work instead of from main. I've opened a clean PR with only the About Us fix: #3382 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.







-1_instruments_screen.png?raw=true)
-2_nav_drawer.png?raw=true)
-3_accelerometer.png?raw=true)
-4_power_source.png?raw=true)
-5_multimeter.png?raw=true)
-6_wave_generator.png?raw=true)
-7_oscilloscope.png?raw=true)
Fixes#3374
Problem
The feedback/bug-report link in the About Us screen called
launchUrl()directly with nocanLaunchUrlcheck and notry/catch. If the URL fails to launch for any reason (no browser, network issue, invalid URL), the app throws an unhandled exception and crashes.Root Cause
Line 138 of
lib/view/about_us_screen.dart:Other links in the same file already use
canLaunchUrlguard correctly, but this one was missed.Fix
Added
canLaunchUrlcheck before callinglaunchUrl, consistent with the existing pattern used by other links in the same file:Impact
Screenshots / Recordings
N/A — crash fix, no UI changes
Checklist
constants.dartor localization files instead of hard-coded values.dart formator the IDE formatter.flutter analyzeand tests run influtter test.